import Vue from 'vue'
import Router from 'vue-router'
import AppIndex from '@/components/home/AppIndex'
import Login from '@/components/Login'
import Home from '@/components/Home'
import CaseInfo from '@/components/home/CaseInfo'
import CaseInput from '@/components/home/CaseInput'
import CaseTextGraph from '@/components/home/CaseTextGraph'
import CaseGraphicGraph from '@/components/home/CaseGraphicGraph'
import CasePatientImg from '@/components/home/CasePatientImg'
import CaseStatistics from '@/components/home/CaseStatistics'
import CaseTreatment from '@/components/home/CaseTreatment'
import CaseSimilar from '@/components/home/CaseSimilar'
import CaseWordCloud from '@/components/home/CaseWordCloud'
import messageNotify from '@/components/home/messageNotify'
import personalCenter from '@/components/home/personalCenter'
import changeEmail from '@/components/home/changeEmail'
import changePassword from '@/components/home/changePassword'
import changePhoneNum from '@/components/home/changePhoneNum'
import privateAgreement from '@/components/home/privateAgreement'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      redirect: 'index',
      children: [
        {
          path: '/index',
          name: 'Index',
          component: AppIndex
        },
        {
          path: '/case/info',
          name: 'CaseInfo',
          component: CaseInfo
        },
        {
          path: '/privateAgreement',
          name: 'privateAgreement',
          component: privateAgreement
        },
        {
          path: '/case/input',
          name: 'CaseInput',
          component: CaseInput
        },
        {
          path: '/case/textGraph',
          name: 'CaseTextGraph',
          component: CaseTextGraph
        },
        {
          path: '/case/graphicGraph',
          name: 'CaseGraphicGraph',
          component: CaseGraphicGraph
        },
        {
          path: '/case/patientImg',
          name: 'CasePatientImg',
          component: CasePatientImg
        },
        {
          path: '/case/statistics',
          name: 'CaseStatistics',
          component: CaseStatistics
        },
        {
          path: '/case/treatment',
          name: 'CaseTreatment',
          component: CaseTreatment
        },
        {
          path: '/case/similar',
          name: 'CaseSimilar',
          component: CaseSimilar
        },
        {
          path: '/case/wordCloud',
          name: 'CaseWordCloud',
          component: CaseWordCloud
        },
        {
          path: '/case/message',
          name: 'messageNotify',
          component: messageNotify
        },
        {
          path: '/case/personal',
          name: 'personalCenter',
          component: personalCenter
        },
        {
          path: '/case/changeEmail',
          name: 'changeEmail',
          component: changeEmail
        },
        {
          path: '/case/changePassword',
          name: 'changePassword',
          component: changePassword
        },
        {
          path: '/case/changePhoneNum',
          name: 'changePhoneNum',
          component: changePhoneNum
        },
        {
          path: '/case/privateAgreement',
          name: 'privateAgreement',
          component: privateAgreement
        }
      ]
    }
  ]
})
